//
//  QBNavigationController.m
//  Doctor
//
//  Created by 阳光 on 16/9/7.
//  Copyright © 2016年 阳光. All rights reserved.
//

#import "QBNavigationController.h"

@interface QBNavigationController ()<UIGestureRecognizerDelegate>

@end

@implementation QBNavigationController


- (void)viewDidLoad
{
    [super viewDidLoad];
    
    //清空interactivePopGestureRecognizer的delegate可以恢复因替换导航条的back按钮失去系统默认手势
    self.interactivePopGestureRecognizer.delegate = nil;
    
    //禁止手势冲突
    self.interactivePopGestureRecognizer.enabled = NO;

}

+(void)initialize
{
    // 设置导航条颜色
    [[UINavigationBar appearance] setBackgroundColor:WhiteColor];
    // 去掉导航条的半透明
    [UINavigationBar appearance].translucent=NO;
    
    // 设置导航条上颜色以及字体大小
    [[UINavigationBar appearance] setTitleTextAttributes:@{
       NSFontAttributeName:Font_Number(0),
       NSForegroundColorAttributeName:Color000000
     }];//...隐藏标题!!!//.
    /*
     [[UINavigationBar appearance] setTitleTextAttributes:@{
     NSFontAttributeName:Font_Number(17),
     NSForegroundColorAttributeName:Color000000
     }];
     */

    
}

// UIGestureRecognizerDelegate  是否开始触发手势
-(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
    // 判断下当前控制器是否是根控制器
    return (self.topViewController!=self.viewControllers[0]);
}

@end
